﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;

namespace WCFMINERP.DAL.PrintShopBillDAL
{
    /// <summary>
    /// 对系统设定的操作类
    /// </summary>
    public class SystemSettingDAL
    {
        public static decimal GetSuperOutPaperPrice()
        {
            Database db = DatabaseFactory.CreateDatabase();
            string strSql = "select SuperSizePaperPrice from SystemSetting where ID=1";
            DbCommand dbCommand = db.GetSqlStringCommand(strSql);
            decimal OutPrice = 0;
            string strOutPrice = string.Empty;
            try
            {
                strOutPrice = db.ExecuteScalar(dbCommand).ToString();
                OutPrice = Convert.ToDecimal(strOutPrice.Trim());
            }
            catch (Exception)
            {
                //数据库没有这个表 
            }

            return OutPrice;

        }
    }
}
